Remove redundant `apply` with `derived-mode-p`
authorStefan Kangas <stefankangas@gmail.com>
Mon, 12 Feb 2024 01:38:30 +0000 (02:38 +0100)
committerStefan Kangas <stefankangas@gmail.com>
Mon, 12 Feb 2024 01:43:35 +0000 (02:43 +0100)
* lisp/cedet/mode-local.el (mode-local-map-mode-buffers):
* lisp/progmodes/which-func.el (which-func-try-to-enable):
(which-func-ff-hook): Remove redundant 'apply' with 'derived-mode-p'.
Suggested by Philip Kaludercic <philipk@posteo.net>.

lisp/cedet/mode-local.el
lisp/progmodes/which-func.el

index 28f142327049ca2c58f9c2ebe6fee79d0fc33148..9f11b9707bd58c7290f88fc0e4edc3c6faa84584 100644 (file)
@@ -1,6 +1,6 @@
 ;;; mode-local.el --- Support for mode local facilities  -*- lexical-binding:t -*-
 ;;
-;; Copyright (C) 2004-2005, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
 ;;
 ;; Author: David Ponce <david@dponce.com>
 ;; Created: 27 Apr 2004
@@ -84,7 +84,7 @@ MODES can be a symbol or a list of symbols.
 FUNCTION does not have arguments."
   (setq modes (ensure-list modes))
   (mode-local-map-file-buffers
-   function (lambda () (apply #'derived-mode-p modes))))
+   function (lambda () (derived-mode-p modes))))
 \f
 ;;; Hook machinery
 ;;
index 631cb3b0aef75d8c39ada56d7c9afda290f57a8b..b36e13104e3533b55d7efd368894b636a494acb1 100644 (file)
@@ -211,7 +211,7 @@ non-nil.")
   (when which-function-mode
     (unless (local-variable-p 'which-func-mode)
       (setq which-func-mode (or (eq which-func-modes t)
-                                (apply #'derived-mode-p which-func-modes)))
+                                (derived-mode-p which-func-modes)))
       (setq which-func--use-mode-line
             (member which-func-display '(mode mode-and-header)))
       (setq which-func--use-header-line
@@ -239,7 +239,7 @@ It creates the Imenu index for the buffer, if necessary."
 
   (condition-case err
       (if (and which-func-mode
-              (not (apply #'derived-mode-p which-func-non-auto-modes))
+               (not (derived-mode-p which-func-non-auto-modes))
               (or (null which-func-maxout)
                   (< buffer-saved-size which-func-maxout)
                   (= which-func-maxout 0)))